package com.it.zhangjun.design.pattern.statePattern;

/**
 * @className: CarState
 * @description: 汽车状态抽象类
 * @author: z00018123
 * @date: 2021/4/29
 **/
public abstract class CarState {

    protected Context context;

    public void setContext(Context context) {
        this.context = context;
    }

    /**
     * 开门动作
     */
    protected abstract void open();

    /**
     * 关门动作
     */
    protected abstract void close();

    /**
     * 飞奔动作
     */
    protected abstract void run();

    /**
     * 停止动作
     */
    protected abstract void stop();
}
